﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ADDDF.Infrastructure
{
    /// <summary>
    /// IAllowKeyAssignment interface gives the ability to set the value of the Key property.
    /// An entity should implement IAllowKeyAssignment if a unique key cannot be determined
    /// when it is created, and the key needs to be assigned by external means (such as from
    /// an AutoNumber field, or an Identity feild in a database). An entity whose key is
    /// already assigned during creation should not implmement this interface.
    /// </summary>
    public interface IAllowKeyAssignment
    {
        /// <summary>
        /// Assign a key to an object.
        /// </summary>
        /// <param name="key">Value of key</param>
        void AssignKey(object key);
    }
}
